<?php

header('Content-Type:text/html;charset=utf-8');

@$a=$_POST['xcpm'];
@$b=$_POST['cdlx'];
@$c=$_POST['xcpjg'];
@$d=$_POST['cpid'];




$PDO=new PDO('mysql:dbname=diancan;charset=UTF8;','root');

$sel=$PDO->prepare('update vtbiao set name=:aa,typeid=(select id from vttype where typename=:bb),unitprice=:cc where id=:dd');

$isok=$sel->execute(array('aa'=>$a,'bb'=>$b,'cc'=>$c,'dd'=>$d));

header('Location:cpgl.php');



?>